﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace HengTong.DataAccess.Migrations
{
    /// <inheritdoc />
    public partial class 人员应聘表关联招聘发布单移除招聘需求池 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_SysPerson_SysHrRecruitPool_RecruitPoolId",
                table: "SysPerson");

            migrationBuilder.DropIndex(
                name: "IX_SysPerson_RecruitPoolId",
                table: "SysPerson");

            migrationBuilder.DropColumn(
                name: "RecruitPoolId",
                table: "SysPerson");

            migrationBuilder.AlterColumn<bool>(
                name: "IsExternalPublish",
                table: "SysHrRecruitPublishRequestBill",
                type: "bit",
                nullable: true,
                oldClrType: typeof(bool),
                oldType: "bit");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<Guid>(
                name: "RecruitPoolId",
                table: "SysPerson",
                type: "uniqueidentifier",
                nullable: true);

            migrationBuilder.AlterColumn<bool>(
                name: "IsExternalPublish",
                table: "SysHrRecruitPublishRequestBill",
                type: "bit",
                nullable: false,
                defaultValue: false,
                oldClrType: typeof(bool),
                oldType: "bit",
                oldNullable: true);

            migrationBuilder.CreateIndex(
                name: "IX_SysPerson_RecruitPoolId",
                table: "SysPerson",
                column: "RecruitPoolId");

            migrationBuilder.AddForeignKey(
                name: "FK_SysPerson_SysHrRecruitPool_RecruitPoolId",
                table: "SysPerson",
                column: "RecruitPoolId",
                principalTable: "SysHrRecruitPool",
                principalColumn: "ID");
        }
    }
}
